/**
 * @description User-Service parameters
 */
const ErrorCode = require('./common/error_code')
import {Context} from "@midwayjs/socketio"

export declare interface IUserOptions {
  uid: string;
}

export interface CustomSocketIOContext extends Context {
  rid: string;
}

export interface WebSocketContext extends Context {
  sid: string;
  rid: string;
}

export interface IGetUserResponse {
  success: boolean;
  message: string;
  data: IUserOptions;
}

// src/interface.ts
declare module 'egg' {
  
  export interface Context {
    hello: string;
    rid:string;
  }

  export interface Application { 
    sms: Object;
    ErrorCode: typeof ErrorCode;
    utils:any;
  }
}

  // extend your config
  // interface EggAppConfig {
  //   sequelize: EggSequelizeOptions | DataSources;
  // }

export enum SocketRequestEvent {
  GREET = 'greet',
}

export enum SocketResponseEvent {
  GREET = 'greetResult',
}
